package com.blog.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.blog.dao.UserMapper;
import com.blog.entity.User;

@Transactional
@Service
public class UserServiceImpl implements UserService{

	@Autowired UserMapper userMapper;
	
	@Override
	public Integer insertUser(User user) {
		int res = userMapper.insertUser(user);
		return res;
	}

	@Override
	public User findByName(String loginName) {
		User user = userMapper.findByName(loginName);
		return user;
	}

	@Override
	public Integer upDateUser(User user) {
		int res = userMapper.upDateUser(user);
		return res;
	}

	@Override
	public Integer batchDelUser(List<String> ArrayList) {
		int res = userMapper.batchDelUser(ArrayList);
		return res;
	}
	
}
